package main

import (
	_ "quickstart/routers"

	"github.com/astaxie/beego"

	// 导入orm包
	"github.com/astaxie/beego/orm"
	// 导入mysql驱动
	_ "github.com/go-sql-driver/mysql"
)

func init() {
	orm.RegisterDataBase("default", "mysql", "root:root@tcp(localhost:3306)/cmstest?charset=utf8&parseTime=true&loc=Local")

	// 打开调试模式，开发的时候方便查看orm生成什么样子的sql语句
	orm.Debug = true
}

func main() {
	// beego.AutoRouter(&controllers.UserControllers{})
	beego.Run()
}
